package SimpleDateFormateDame;

import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;

public class test {
    public static void main(String[] args) throws ParseException {
        String s = "1999-10-22";
        SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
        Date birthday = sdf.parse(s);
        Date now = new Date();
        long time = now.getTime()- birthday.getTime();
        System.out.println(time);
        long day = time / 1000 /60/60/24;
        System.out.println(day);
        System.out.println(day/365);
    }
}
